package 抽象工厂.PIFU;

//抽象工厂类
public abstract class PIFUFactory {
    public abstract Button getButton(); //获取按钮
    public abstract Text getText();//获取文本框
    public abstract Complex getComplex();//获取复合框
}

//春天皮肤工厂
class SpringFactory extends PIFUFactory{

    public Button getButton() {
        return new GreenButton();
    }

    public Text getText() {
        return new GreenText();
    }

    public Complex getComplex() {
        return new GreenComplex();
    }
}

//夏天皮肤工厂
class SummerFactory extends PIFUFactory{
    public Button getButton() {
        return new BlueButton();
    }

    public Text getText() {
        return new BlueText();
    }

    public Complex getComplex() {
        return new BlueComplex();
    }
}


//新增的秋天皮肤工厂
class AutumnFactory extends PIFUFactory{
    public Button getButton() {
        return new YellowButton();
    }
    public Text getText() {
        return new YellowText();
    }
    public Complex getComplex() {
        return new YellowComplex();
    }
}
